Selection Values

The text field below mirrors the current value of the selection when you press the "Show Selection" button.

Discussion

This script shows how to access text values from an OPTIONS array and manipulate the value of a TEXT field.
function reflect(aForm)
{
    var myIndex = aForm.units.selectedIndex
    var myText = aForm.units.options[myIndex].text
    aForm.result.value = myText
}
Copyright ©1998 by Charles River Media, All Rights Reserved